package com.icesoft.xsnow.upms.api.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.icesoft.xsnow.framework.api.po.NormalEntity;
import com.icesoft.xsnow.framework.api.valid.Create;
import com.icesoft.xsnow.framework.api.valid.Update;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @program: xsnow
 * @description:
 * @author: xuefeng.gao
 * @create: 2019-05-29 13:35
 **/
@ApiModel
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class RegisterShopParam  extends NormalEntity {

    @TableId(type = IdType.AUTO)
    @NotBlank(groups = {Update.class}, message = "商铺id不允许为空")
    protected Integer id;

    @Size(min = 4,max = 20,message = "商铺名长度在4-20之间")
    @NotBlank(groups = {Create.class,Update.class}, message = "商铺名不允许为空")
    private String name;

    @Size(max = 1024,message = "商铺简介最多1000个字符")
    private String description;


}
